<?php
/**
 * Created by PhpStorm.
 * User: fuguang
 * Date: 2017/6/5
 * Time: 下午2:40
 */

namespace backend\models;

use yii\base\Model;
use yii\web\UploadedFile;

class UploadForm extends Model
{
    /**
     * @var UploadedFile file attribute
     */
    public $file;

    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
            [['file'], 'file', 'skipOnEmpty' => false, 'extensions' => 'json,zip','maxSize' => 20*1024*1024],
        ];
    }
}